/** 查询用户列表 */
export function listUserApi(query: UserRecord): Promise<ApiRowsRecord<UserRecord[]>> {
  return request({
    url: `/system/user/list`,
    method: 'get',
    params: query
  });
}

/** 查询用户详细 */
export function getUserApi(id: number): Promise<ApiDataRecord<UserRecord>> {
  return request({
    url: `/system/user/${id}`,
    method: 'get'
  });
}

/** 新增用户 */
export function addUserApi(data: UserRecord): Promise<ApiRecord> {
  return request({
    url: `/system/user`,
    method: 'post',
    data: data
  });
}

/** 修改用户 */
export function updateUserApi(data: UserRecord): Promise<ApiRecord> {
  return request({
    url: `/system/user`,
    method: 'put',
    data: data
  });
}

/** 删除用户 */
export function delUserApi(id: number[]): Promise<ApiRecord> {
  return request({
    url: `/system/user/${id}`,
    method: 'delete'
  });
}